Generating target sequences from input sequences using partial conditioning

ABSTRACT

A system can be configured to perform tasks such as converting recorded speech to a sequence of phonemes that represent the speech, converting an input sequence of graphemes into a target sequence of phonemes, translating an input sequence of words in one language into a corresponding sequence of words in another language, or predicting a target sequence of words that follow an input sequence of words in a language (e.g., a language model). In a speech recognizer, the RNN system may be used to convert speech to a target sequence of phonemes in real-time so that a transcription of the speech can be generated and presented to a user, even before the user has completed uttering the entire speech input.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to U.S. Provisional Application No.62/254,687, filed on Nov. 12, 2015. The disclosure of the priorapplication is considered part of and is incorporated by reference inits entirety in the disclosure of this application.

TECHNICAL FIELD

This specification generally relates to systems, methods, devices, andother techniques for generating representations of input sequences usingneural networks.

BACKGROUND

Many data processing tasks involve converting an ordered sequence ofinputs into an ordered sequence of outputs. For example, machinetranslation systems translate an input sequence of words in one languageinto a sequence of words in another language. As another example,pronunciation systems convert an input sequence of graphemes into atarget sequence of phonemes.

SUMMARY

This specification describes a system implemented as computer programson one or more computers in one or more locations.

The system is a system for generating a target sequence that includes arespective output at each of multiple output time steps from an inputsequence that includes a respective input at each of multiple input timesteps.

In particular, the system can be used for online sequence transductionbecause the system selects the current output in the target sequenceconditioned on the partial input sequence observed, i.e., rather on theentire input sequence, and the partial target sequence generated so far.

More specifically, for each block consisting of a fixed number of inputtime steps in the input sequence, the system processes each input in theblock of input time steps using an encoder recurrent neural network(RNN) to generate a respective feature representation of the input. Thesystem then processes the feature representations for the inputs in theblock and a preceding output at a preceding output time step using atransducer RNN to select a respective output for each of one or moreoutput time steps immediately following the preceding output time step.Thus, the system can use the transducer RNN to begin selecting outputsfor the target sequence before the encoder RNN has generated the featurerepresentations for all of the inputs in the input sequence.

Embodiments of the subject matter described herein may optionallyinclude one or more of the following features.

For the initial block in the input sequence, the preceding output at thepreceding output time step can be a placeholder start-of-sequenceoutput.

Processing the feature representations for the inputs in the block and apreceding output at a preceding output time step using a transducer RNNto select a respective output for each of one or more output time stepsimmediately following the preceding output time step can includeselecting outputs until the selected output is a designated end-of-blockoutput.

Processing the feature representations for the inputs in the block andthe preceding output at a preceding output time step using thetransducer RNN can include processing the feature representations forthe inputs in the block and the preceding output using the transducerRNN to select a current output for a current output time stepimmediately following the preceding output time step. When the currentoutput is the designated end-of-block output, the system can refrainfrom generating any more outputs for the block. When the current outputis not the designated end-of-block output, the system can process thefeature representations for the inputs in the block and the currentoutput using the transducer RNN to select a next output for a nextoutput time step immediately following the current output time step.

Processing the feature representations for the inputs in the block and apreceding output at a preceding output time step using a transducer RNNto select a respective output for each of one or more output time stepsimmediately following the preceding output time step can includeselecting outputs until a designation portion of an intermediate outputof the transducer RNN indicates that the selected output is the last inthe block.

The transducer RNN can be configured to, for a given block of input timesteps and to select an output for a given output time step, (i) processthe output at an output time step immediately preceding the given outputtime step and a preceding context vector for the output time stepimmediately preceding the given output time step using a first RNNsubnetwork to update a current hidden state of the first RNN subnetwork,(ii) process the updated hidden state of the first RNN subnetwork andthe feature representations for the inputs in the given block of inputtime steps using a context subnetwork to determine a current contextvector, (iii) process the current context vector and the updated hiddenstate of the first RNN subnetwork using a second RNN subnetwork toupdate a current hidden state of the second RNN subnetwork, and (iv)process the current hidden state of the second RNN subnetwork using asoftmax layer to generate a respective score for each output in adictionary of possible outputs.

The context subnetwork can be a recurrent neural network.

The input sequence can be a speech sequence in a first language and thetarget sequence can be a sequence of phonemes that represent the speechsequence, in either the first language or a different second language.

The input sequence can be a speech sequence in a first language and thetarget sequence can be a sequence of words or characters that representthe speech sequence, in either the first language or a different secondlanguage.

In some embodiments, a computer program comprises instructions that whenexecuted by computing apparatus causes it to perform any of the abovemethods.

In some embodiments, a computer storage medium may be encoded withinstructions that, when executed by one or more computers, cause the oneor more computers to perform operations for generating a target sequencethat includes a respective output at each of multiple output time stepsfrom an input sequence that includes a respective input at each ofmultiple input time steps. The operations can include, for example, anyof the foregoing operations described in this section.

In some embodiments, a system that includes one or more computers andone or more storage devices may store instructions that are operable,when executed by the one or more computers, to cause the one or morecomputers to perform operations for generating a target that includes arespective output at each of multiple output time steps from an inputsequence that includes an respective input at each of multiple inputtime steps. The operations can include, for example, any of theforegoing operations described in this section.

DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual diagram of a recurrent neural network system thatgenerates a respective portion of an output sequence for each block ofinput time steps of an input sequence.

FIG. 2 is a block diagram of an example recurrent neural network systemthat is configured to perform online sequence-to-sequence transductionusing partial conditioning of inputs received and outputs generated thusfar.

FIG. 3 is a conceptual diagram of a recurrent neural network systemperforming next-step predictions to generate outputs of a targetsequence corresponding to inputs at a block of input time steps.

FIG. 4 is a flowchart of an example process for using a recurrent neuralnetwork system to process inputs for blocks of input time steps and togenerate an output sequence using partial conditioning.

FIG. 5 is a flowchart of an example process for using a transducer RNNto select a current output in an output sequence using partialconditioning on inputs in an input sequence and outputs for one or morepreceding time steps in an output sequence.

Like references and identifiers among the various drawings indicate likeelements.

DETAILED DESCRIPTION

This document generally describes systems, methods, devices, and othertechniques for using a recurrent neural network (RNN) system to generatea target sequence of outputs from an input sequence of inputs. The inputsequence can include a respective input at each of a series of inputtime steps and the target sequence of outputs can include a respectiveoutput at each of a series of output time steps. The system can beconfigured to perform tasks such as converting recorded speech to asequence of phonemes that represent the speech, converting an inputsequence of graphemes into a target sequence of phonemes, translating aninput sequence of words in one language into a corresponding sequence ofwords or characters in another language, converting recorded speech intoa translated sequence of words or characters in another language, orpredicting a target sequence of words that follow an input sequence ofwords in a language (e.g., a language model).

More particularly, this document describes how the system may select anoutput at a current time step in the target sequence conditioned on onlya portion of the input sequence, e.g., the portion of the input sequencethat has been observed thus far, and further conditioned on the portionof the target sequence that has been generated thus far. Accordingly,the system may be suitable for performing online tasks in which outputsare provided before the entire input sequence has been observed. Forinstance, in a speech recognizer, the RNN system may be used to convertspeech to a target sequence of phonemes in real-time so that atranscription of the speech can be generated and presented to a user,even before the user has completed uttering the entire speech input.

Referring to FIG. 1, a conceptual diagram is shown of an RNN system 100processing an input sequence 106 to generate a target output sequence108 using partial conditioning on blocks of inputs observed up to acurrent time step (e.g., rather than conditioning on the entire inputsequence before beginning to select outputs for the target sequence).

The RNN system 100 can be implemented as one or more computer programson one or more computers in one or more locations. The RNN system 100includes an encoder RNN 102 and a transducer RNN 104. Both the encoderRNN 102 and the transducer RNN 104 are neural networks, and inparticular, are recurrent neural networks (RNNs).

Neural networks are machine-learning models that employ one or morelayers of nonlinear units to predict an output for a received input.Some neural networks include one or more hidden layers in addition to anoutput layer. The output of each hidden layer is used as input to one ormore other layers in the network, e.g., the next hidden layer or theoutput layer. Each layer of the network generates an output from areceived input in accordance with current values of a respective set ofparameters.

RNNs, such as encoder RNN 102 and transducer RNN 104, are neuralnetworks that are configured to receive an input sequence and generatean output sequence from the input sequence. An RNN can use some or allof the internal state of the network from a previous time step incomputing an output at a current time step. AN example of an RNN is along short-term (LSTM) neural network.

The RNN system 100 generates the target output sequence 108 from blocksof inputs of input sequence 106. Each block of inputs represents arespective portion of the entire input sequence 106. In particular, eachblock consists of inputs at a set of successive time steps of the inputsequence 106. Generally, the blocks of input are non-overlapping suchthat each input time step is assigned to only one block. For example,three blocks 106 a, 106 b, and 106 c are depicted in FIG. 1. The firstinput block 106 a includes inputs for a first set of inputs of the inputsequence 106, i.e., inputs X₍₁₎₁ through X_((1)W); the second inputblock 106 b includes inputs for a next set of inputs of the inputsequence 106 that immediately follow the first set of inputs, i.e.,inputs X₍₂₎₁ through X_((2)W); and the third input block 106 c includesinputs for yet another set of inputs of the input sequence 106 thatimmediately follow the second set of inputs, i.e., inputs X₍₃₎₁ throughX_((3)W). In some implementations, the number of input time steps ineach block of the input sequence 106 is fixed such that all the blocksare of the same length. In other implementations, the lengths of theblocks may not be fixed such that particular blocks of the inputsequence 106 have different lengths, e.g., inputs for different numbersof time steps from one or more other blocks of the input sequence 106.

For each block of inputs, the system 100 is configured to process theinputs at each time step in the block using encoder RNN 102. The encoderRNN 102 generates a feature representation for each input in the block,which features are then used by the transducer RNN 104 to generateoutputs for the target sequence. In some implementations, the featurerepresentation for a given input is the current hidden state of theencoder 102 that results from processing the input at a current timestep. For example, the first input in a block may be processed by theencoder RNN 102 to update the current hidden state of the encoder RNN102. The system 100 then uses the updated hidden state of the encoderRNN 102 as the feature representation for the first input (e.g., thesystem may generate a vector of values that characterize the updatedhidden state of the encoder 102). Then the second input in the block maybe processed by the encoder RNN 102 to again update the current hiddenstate of the encoder RNN 102. The system 100 uses the most recentlyupdated hidden state of the encoder 102 as the feature representationfor the second input. Each additional input in the block is processed insequence by the encoder RNN 102 in a like manner. Moreover, at each timestep of the input sequence, the encoder RNN 102 can, in effect, beconditioned on the inputs from all previous time steps of the inputsequence because the system 100 refrains from resetting the hidden statefrom any preceding time step. For example, the hidden state of theencoder 102 for the first input of each block after the first blockcarries forward from the updated hidden state that results fromprocessing the last input of an immediately preceding block.

For instance, because the encoder 102 is recurrent, the current hiddenstate of the encoder 102 at any given time step is conditioned not onlyon the respective input at the time step, but also on the inputs at oneor more (e.g., all) preceding time steps of the input sequence 106. Insome implementations, the hidden state of the encoder RNN 102 ispartially conditioned on inputs from previous blocks of the inputsequence 106. For example, when the encoder RNN 102 processes the firstinput X₍₂₎₁ of the second block 106 b, the current hidden state ofencoder RNN 102 is conditioned on the inputs from the first block 106 a.Thus, the hidden state of the encoder 102 is not reset between blocks.

Once the system 100 has generated feature representations for all theinputs in a block, the system 100 uses the transducer RNN 104 to processthe feature representations for the inputs and a preceding output at apreceding output time step to select a respective output for each of oneor more output time steps immediately following the preceding outputtime step. For instance, the feature representations 110 a for theinputs of the first block 106 a can be processed using the transducerRNN 104 to generate a first block 108 a of outputs of the targetsequence 108. The transducer RNN 104 generates the first block 108 a ofoutputs by conditioning the hidden state of the transducer using thefeature representations 110 a of the first block 106 a of inputs, andcomputes the output at each output time step in the first output block108 a based on the output of a preceding time step and in accordancewith the current hidden state of the transducer 104. In someimplementations, the output Y₍₁₎₁ at the first time step of the targetsequence 108 may be generated using the feature representations 110 afor the inputs of the first block 106 a and a placeholderstart-of-sequence token <s> (e.g., rather than using a preceding output,since no preceding output is available). Each subsequent output Y₍₁₎₂through Y_((1)e) for the time steps in the first output block 108 a canbe generated by processing the preceding output in accordance currentparameters (i.e., the current hidden state) of the transducer RNN 104,which is updated as a result of the processing at each output time step.

The transducer RNN 104 continues generating additional outputs for agiven output block until the system 100 identifies that an end-of-blockcondition has occurred. The total number of time steps in an outputblock may not be fixed or pre-defined, and the number of time steps inany two output blocks of the target sequence 108 may be the same ordifferent from each other. Moreover, the number of output time steps inan output block may be the same or different from the number of inputtime steps of the corresponding input block.

In some implementations, the transducer RNN 104 continues to generateoutputs for additional output time steps until the generated output is adesignated end-of-block output. If the system 100 identifies that theoutput for a current time step is the designated end-of-block output,the system 100 refrains from generating any more outputs for the blockusing the transducer RNN 104. If the system identifies that the outputfor a current time step is not the designated end-of-block output, thesystem 100 uses the transducer RNN to select a next output for a nextoutput time step immediately following the current output time step. Inother implementations, the transducer RNN 104 continues to generateoutputs for additional output time steps until a designation portion ofan intermediate output of the transducer RNN 104 indicates that theselected output is the last in the block. For instance, the transducerRNN 104 may produce the intermediate output by applying a logisticfunction on a hidden state of the transducer RNN 104 or the hidden stateof a portion of the transducer RNN 104. The target of the logisticfunction, i.e., the intermediate output, can be 0 or 1 depending onwhether the current step is the last step in the block or not. Thesystem 100 may check the intermediate output at each output time step todetermine whether to continue generating outputs for additional timesteps for the block.

Accordingly, the system 100 is configured to generate partial outputsequences based on a partial input sequence of inputs observed so far.As additional blocks of input are observed, the system 100 processeseach block to generate additional outputs that extend the outputsequence 108. Thus, the system 100 generates outputs Y₁₍₁₎ throughY_((1)e) in the first output block 108 a based on inputs from the firstinput block 106 a, and then generates outputs Y₍₂₎₁ through Y_((2)e) inthe second output block 108 b based on inputs from the second inputblock 106 b. However, when the transducer RNN 104 begins processingfeatures 110 b of the inputs from the second input block 106 b, thehidden state of the transducer RNN 104 is partially conditioned on thehidden state of the transducer 104 from a preceding output time step inthe first output block 108 a. Moreover, the transducer RNN 104 processesthe preceding output Y_((1)e) from the first output block 108 a, inaddition to the features of the inputs from the second input block 106b, to generate the first output Y₍₂₎₁ of the second output block 108 b,thereby making the outputs in the second block 108 b partiallyconditioned on the inputs observed thus far and the outputs generatedthus far. The system 100 can process subsequent blocks of the inputsequence 106 in a like manner to generate additional blocks of thetarget sequence 108 a before the entire input sequence 106 is observed.For instance, a third output block (not shown) can be generated usingthe transducer RNN 104 by processing features 110 c of inputs X₍₃₎₁through X_((3)w) of the third input block 106 c and preceding outputs.

In some implementations, system 100 is configured to use the encoder RNN102 to generate features of inputs at substantially the same rate thatinputs for the input sequence 106 are received. The system 100 can thengenerate and present extensions to the target sequence 108 in real-timeas the system 100 continues to receive additional portions of the inputsequence 106.

FIG. 2 depicts an example RNN system 200 for generating target sequencesfrom input sequences. The RNN system 200 includes an encoder RNN 202 anda transducer RNN 204. The transducer RNN 204 includes a contextsubnetwork 206, a first RNN subnetwork 208, a second RNN subnetwork 210,and a softmax layer 212.

The RNN system 200 is configured to generate blocks of outputs asadditional blocks of inputs are observed. The system 200 generatesoutputs for each block of input by using transducer RNN 204 thatgenerates local extensions to an output target sequence, conditioned onthe features computed for the block of inputs by the encoder RNN 202 andthe recurrent state of the transducer RNN 204 at the last step of theprevious block. The transducer RNN 204 maintains its state across blocksof input through the use of recurrent connections to the previous timesteps and blocks. Conditioning over the history of outputs produced in agiven block is achieved by processing at each time step the respectiveoutput of the immediately preceding time step. Conditioning over theentire history of outputs produced so far is achieved by the transducerRNN 204, through the use of its recurrent connections across blocks.Conditioning on the entire partial input seen so far is achieved throughthe propagation of information through the recurrent states of theencoder RNN 202.

In particular, the encoder RNN 202 is configured to generate a featurerepresentation for each input in a block of inputs. In someimplementations, the feature representation for a given input is theupdated hidden state of the encoder RNN 202 that results from processingthe input.

After the feature representations for the inputs in a block have beenproduced, the transducer RNN 204 uses the feature representations togenerate a block of outputs. More specifically, for a given output timestep, the transducer RNN 204 uses the context subnetwork 206, first RNNsubnetwork 208, second RNN subnetwork 210, and softmax layer 212 todetermine scores for each output in a dictionary of possible outputs.The output for the time step is selected from the dictionary of possibleoutputs based on the scores (e.g., system 200 selects the output withthe highest score as the output for the time step or samples an outputfrom the possible outputs in accordance with their respective scores).

In particular, the context subnetwork 206 processes the featurerepresentations for the inputs in a block of input time steps and anupdated hidden state of the first RNN subnetwork 208 to determine acurrent context vector for a given output time step. The updated hiddenstate of the first RNN subnetwork 208 is determined by processing theselected output at an output time step that immediately precedes thegiven output time step and a preceding context vector for the outputtime step that immediately precedes the given output time step. Thesystem 200 processes the current context vector and the updated hiddenstate of the first RNN subnetwork 208 using the second RNN subnetwork210 to update a current hidden state of the second RNN subnetwork 210,and then the system 200 processes the current hidden state of the secondRNN subnetwork 210 using the softmax layer 212 to generate therespective score for each output in the dictionary of possible outputs.

Certain operations performed by the transducer RNN 204 for scoringpossible outputs for a given output time step m according to parametersθ of transducer RNN 204 are represented by the following sequence ofsteps:

s _(m)=ƒ_(RNN)(s _(m-1) ,[c _(m-1) ;y _(m-1)];θ)  (Equation 1)

c _(m)=ƒ_(context)(s _(m) ,h _(((b-1)W+1 . . . bW);θ)  (Equation 2)

h′ _(m)=ƒ_(RNN)(h′ _(m-1) ,[c _(m) ;s _(m)];θ)  (Equation 3)

p(y _(m) |x _(1 . . . bW) ,y _(1 . . . (m-1)))=ƒ_(softmax)(y _(m) ;h′_(m);θ)  (Equation 4)

In these equations, the variables s, c, h′, and y respectively representthe hidden state of first RNN subnetwork 208, the context vector, thehidden state of the second RNN subnetwork 210, and the selected outputfor the output time step. First, the first RNN subnetwork 210 evaluatesthe ƒ_(RNN) function to determine the updated hidden state s_(m) byprocessing the selected output y_(m-1) from the preceding output timestep and the context vector c_(m-1) from the preceding output time step(equation 1). The function ƒ_(RNN) is a recurrent neural networkfunction such as an LSTM, a sigmoid, or tan h RNN.

Second, the context subnetwork 206 evaluates the ƒ_(context) function todetermine a context vector for the current output time step byprocessing the updated hidden state s_(m) of the first RNN subnetwork210 and the feature representations h_(((b-1)W+1 . . . bW) of inputs inthe current input block b (equation 2). The context vector c_(m) can becomputed in two steps—first a normalized attention vector a_(m) iscomputed from the state s_(m) of the first RNN subnetwork 210 and nextthe feature representations h_(((b-1)W+1 . . . bW) of inputs in thecurrent input block b are linearly combined using a and used as thecontext vector. To compute a_(m), a multi-layer perceptron computes ascalar value, e_(j) ^(m) for each pair of transducer states s_(m) andencoder h_((b-1)W+j). The attention vector is computed from the scalarvalues, e_(j) ^(m), j=1 . . . W, where W is the block size, e.g., theperiodicity with which the transducer emits output tokens. This can beformally represented as follows:

e _(j) ^(m)=ƒ_(attention)(s _(m) ,h _((b-1)W+j);θ)  (Equation 5)

a _(m)=softmax([e ₁ ^(m) ;e ₂ ^(m) ; . . . e _(W) ^(m)])  (Equation 6)

c _(m)=Σ_(j=1) ^(W) a _(j) ^(m) h _((b-1)W+j)  (Equation 7)

Third, the second RNN subnetwork 210 evaluates the ƒ_(RNN) function todetermine the updated hidden state h′_(m) of the second RNN subnetwork210 by processing the context vector c_(m) for the current output timestep and the updated hidden state s_(m) of the first RNN subnetwork 208for the current output time step. The function ƒ_(RNN) is a recurrentneural network function such as an LSTM, a sigmoid, or tan h RNN.

Fourth, the transducer 204 uses the softmax layer 212 to score eachpossible output y_(m) in a dictionary of outputs. The score for a givenpossible output y_(m) can indicate a probability that the given possibleoutput y_(m) is the true (desired) output at the current output timestep in a target sequence. The score is conditioned on the entire inputsequence observed thus far and the partial output sequence generatedthus far. The softmax layer 212 generates a softmax distribution byprocessing the current hidden state of the second RNN subnetwork 210.

In some implementations, the context subnetwork 206 uses the hiddenstate of the encoder as the context vector c_(m), thereby avoiding thecomputational expense of generating on as described in the precedingmanner.

FIG. 3 is a conceptual diagram of an example RNN system 300 performingnext-step predictions to generate a block of outputs for a targetsequence. In some implementations, the RNN system 300 is configured in alike manner as the RNN systems 300 described elsewhere in this document,e.g., RNN system 100 (FIG. 1) or RNN system 200 (FIG. 2). In particular,FIG. 3 illustrates how the RNN system may process inputs 302 from aparticular block of input time steps 303 b to generate outputs for acorresponding block of output time steps. The block of input time steps303 b represents a proper portion of the entire input sequence 302 andthe block of output time steps represents a proper portion of the entireoutput (target) sequence 308.

The RNN system 300 includes an encoder RNN 304 and a transducer RNN 306.The encoder RNN 304 is configured to process inputs from the inputsequence 302 and to maintain a hidden state based on recurrentconnections within the encoder RNN 304. The system 300 feeds inputs tothe encoder RNN 304 in order at each input time step. By way of example,FIG. 3 shows an audio signal 301 of recorded speech, which is sampled togenerate input sequence 302. The last input X_((b-1)W) is shown for thefirst block of input time steps 303 a. Inputs X_((b-1)W+1) throughX_(bW) are shown for the second block of input time steps 303 b, and thefirst input X_(bW+1) is shown for the third block of input time steps303 c.

The hidden state of the encoder 304 at each time step is represented bythe blocks labeled h. At each time step, the hidden state h of theencoder 304 is updated by processing the respective input for that timestep. For instance, h_((b-1)W+1) represents the hidden state of theencoder RNN 304 upon processing input X_((b-1)W+1) and h_(bW) representsthe hidden state of the encoder RNN 304 upon processing input X_(bW).Dependencies among inputs across time steps seen by the encoder 304 upto a current time step are achieved by recurrent connections of theencoder RNN 304.

The system 300 processes the respective hidden state of the encoder RNN304 at each input time step to determine a feature representation forthe respective input at the input time step. The system 300 thenprovides the feature representations of the inputs for the block 303 bto the transducer RNN 306 to begin generating outputs 308 correspondingto the input block 303 b.

The transducer RNN 306 includes a context subnetwork 310, a first RNNsubnetwork 312, a second RNN subnetwork 314, and a softmax layer 316.The context subnetwork 310 processes the feature representations forinputs X_((b-1)W+1) through X_(bW) to generate context vector c. In someimplementations, the context subnetwork 310 further processes the hiddenstate s of the first RNN subnetwork 312 to generate the context vectorc. The hidden state s of the first RNN subnetwork 312 and hidden stateh′ of the second RNN subnetwork 314 can be partially conditioned oninputs observed thus far and outputs generated thus far based onrecurrent connections that are maintained by the transducer RNN acrosstime steps, both within a block of time steps and across blocks of timesteps.

For a given output time step, the output y can be selected from adictionary of possible outputs by (i) processing the output from theimmediately preceding time step and the context vector from theimmediately preceding time step using the first RNN subnetwork 312 toupdate the hidden state s of the first RNN subnetwork 312, (ii)processing the feature representations of the inputs from the currentblock of input time steps and the updated hidden state s of the firstRNN subnetwork 312 using the context subnetwork 310 to generate acurrent context vector c, (iii) processing the current context vector cand the updated hidden state s of the first RNN subnetwork 312 using thesecond RNN subnetwork 314 to update the hidden state h′ of the secondRNN subnetwork 314, and (iv) processing the updated hidden state h′ ofthe second RNN subnetwork 314 using the softmax layer 316 to generate arespective score for each output in the dictionary of possible outputs.The output y that the transducer RNN 306 produces at a given time stepmay be selected from the dictionary of possible outputs based on thescores.

FIG. 4 is a flowchart of an example process 400 for using an RNN systemto generate a target output sequence from an input sequence, where thetarget output sequence includes a respective output for each of a seriesof output time steps and the input sequence includes a respective inputfor each of a series of input time steps. In some implementations, theprocess 400 can be performed by an RNN system in an online context inwhich partial output sequences are generated before the entire inputsequence is observed. The process 400 may be performed, for example, bythe RNN systems 100 (FIG. 1), 200 (FIG. 2), or 300 (FIG. 3).

At stage 402, the RNN system begins to obtain an input sequence. The RNNsystem may receive the input sequence relatively slowly such that thesystem can process frames of the input sequence as they are received andbefore the entire sequence is received.

At stage 404, the RNN system divides the input sequence into blocks ofinput time steps. In some implementations, each block consists of afixed number W of consecutive time steps. In some implementations, thenumber of consecutive time steps in a given block may not be fixed, butinstead may be dynamically selected based on signals that, e.g.,facilitate block alignment with content features (e.g., phonemes,graphemes, words) that are represented by inputs in the input sequence.

At stage 406, the RNN system selects a first block of input time stepsto process from the input sequence.

At stage 408, an encoder RNN of the RNN system processes the sequence ofinputs from the block of input time steps. The system feeds the inputsfrom the block to the encoder RNN one at a time in the order that theyoccur in the input sequence. At each input time step, the encoder RNNprocesses the respective input and updates the hidden state of theencoder RNN. A feature representation of the respective input can bederived from the updated hidden state of the encoder RNN at each inputtime step. For example, the feature representation may be formed as avector of values that characterize the updated hidden state of theencoder RNN.

At stage 410, the RNN system selects a current output from a dictionaryof possible outputs for a current output time step in a block of outputtime steps corresponding to the selected block of input time steps. Theselected output can be determined by processing the featurerepresentations of the inputs from the selected block of input timesteps and the selected output for the output time step that immediatelyprecedes the current output time step in the target sequence. For thefirst output time step in a block of output time steps, the transducerRNN processes the feature representations of the inputs from theselected block and the selected output for the last output time step ofthe preceding block of output time steps. The transducer RNN maintainsits state across blocks and across time steps within a given blockthrough the use of recurrent connections to the previous time steps. Assuch, the selected output for a current time step is further conditionedon the entire portion of the target sequence generated thus far.Additional details concerning the transducer RNN's selection of anoutput for a given time step is represented in the flowchart of FIG. 5and discussed below.

At stage 412, the RNN system checks whether additional outputs are to beselected for the current block of output time steps corresponding to theselected block of input time steps. In some implementations, thetransducer RNN continues to generate outputs for additional output timesteps until the generated output is a designated end-of-block output. Insome implementations, the transducer RNN continues to generate outputsfor additional output time steps until a designation portion of anintermediate output of the transducer RNN indicates that the selectedoutput is the last in the block.

If the RNN system determines that the current output time step is notthe last time step for the current block, then the process 400 advancesto a next time step and returns to stage 410 for determination of anoutput for the next time step. Once the system detects in an iterationthat the current output time step is the last time step for the currentblock (e.g., the system identifies that the output is a designatedend-of-block output), then the process advances to stage 414.

At stage 414, the system checks whether additional blocks of input timesteps remain to be processed. If additional input blocks remain, thenthe process 400 advances to stage 416 where the system selects the nextblock of time steps in the input sequence and then returns to stage 408to select outputs for the next block of output time steps correspondingto the newly selected block of input time steps. Once no further inputblocks remain to be processed, the process 400 proceeds to stage 418 andthe output sequence is completed. Thus, the RNN system can perform theprocess 400 using the transducer RNN to begin selecting outputs for thetarget sequence before the encoder RNN has generated the featurerepresentations for all of the inputs in the input sequence.

Referring to FIG. 5, a flowchart is shown of an example process 500 forselecting an output for a given output time step of a target sequenceusing a transducer RNN of an RNN system. In some implementations, theprocess 500 is performed for each output time step in the targetsequence. The process 500 may be performed, for example, by thetransducer RNN and RNN systems like those discussed herein, e.g.,transducer RNN 104 and RNN system 100 (FIG. 1), transducer RNN 204 andRNN system 200 (FIG. 2), or transducer RNN 306 and RNN system 300 (FIG.3).

At stage 502, the transducer RNN processes, using a first RNN subnetworkof the transducer RNN, the output for an immediately preceding outputtime step and a context vector from the immediately preceding outputtime step to update the current hidden state of the first RNN subnetworkfor the current time step.

At stage 504, the transducer RNN processes, using a context subnetworkof the transducer RNN, the updated hidden state of the first RNNsubnetwork and feature representations for the inputs of the currentblock of input time steps to determine an updated context vector for thecurrent output time step.

At stage 506, the transducer RNN processes, using a second RNNsubnetwork of the transducer RNN, the updated context vector for thecurrent output time step and the updated hidden state of the first RNNsubnetwork for the current output time step to update the hidden stateof the second RNN subnetwork.

At stage 508, the transducer RNN processes, using a softmax layer of thetransducer RNN, the updated hidden state of the second RNN subnetwork todetermine respective scores for each of a set of possible outputs amonga dictionary of outputs. The scores may constitute a softmaxdistribution over the set of possible outputs that represent relativeprobabilities of each of the possible outputs being the true output forthe target sequence at the current output time step.

At stage 510, the system selects an output to emit as the output for thecurrent output time step in the target sequence. The selected output canbe selected based on the scores determined at stage 508. In someimplementations, the output having the highest score among thedetermined scores (e.g., a score that indicates the greatest likelihoodof the corresponding output being the true output of the targetsequence) is selected as the output for the current output time step.

In some implementations, the processes 400 and 500 can be performed forsequences for which the desired output, i.e., the output sequence thatshould be generated by the system for the input sequence, is not known.The system can also perform the processes 400 and 500 on inputs in a setof training data, e.g., a set of input sequences for which the outputsequences that should be predicted by the system is known, in order totrain the system, e.g., to determine trained values for the parametersof the layers of the RNN system (e.g., layers of the encoder RNN andtransducer RNN) and, optionally, for the mappings of words to wordvectors. In particular, the processes 400 and 500 can be performedrepeatedly on input sequences selected from a set of training data aspart of a conventional machine learning training technique to train thelayers of the RNN system, e.g., a stochastic gradient descent withbackpropagation through time training technique.

In some implementations, the processes 400 and 500 are performed forconverting recorded speech to a sequence of phonemes that represent thespeech. In some implementations, the processes 400 and 500 are performedfor converting speech to a target sequence of phonemes in real-time sothat a transcription of the speech can be generated and presented to auser, even before the user has completed uttering the entire speechinput.

In some implementations, the processes 400 and 500 are performed forconverting an input sequence of graphemes into a target sequence ofphonemes.

In some implementations, the processes 400 and 500 are performed fortranslating an input sequence of words in one language into acorresponding sequence of words in another language.

In some implementations, the processes 400 and 500 are performed forpredicting a target sequence of words that follow an input sequence ofwords in a language (e.g., a language model).

In some implementations, the encoders discussed herein areconvolutional, recurrent, or fully connected deep neural networks.

Embodiments of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, in tangibly-embodied computer software or firmware, incomputer hardware, including the structures disclosed in thisspecification and their structural equivalents, or in combinations ofone or more of them. Embodiments of the subject matter described in thisspecification can be implemented as one or more computer programs, i.e.,one or more modules of computer program instructions encoded on atangible non transitory program carrier for execution by, or to controlthe operation of, data processing apparatus. Alternatively or inaddition, the program instructions can be encoded on an artificiallygenerated propagated signal, e.g., a machine-generated electrical,optical, or electromagnetic signal, that is generated to encodeinformation for transmission to suitable receiver apparatus forexecution by a data processing apparatus. The computer storage mediumcan be a machine-readable storage device, a machine-readable storagesubstrate, a random or serial access memory device, or a combination ofone or more of them. The computer storage medium is not, however, apropagated signal.

The term “data processing apparatus” encompasses all kinds of apparatus,devices, and machines for processing data, including by way of example aprogrammable processor, a computer, or multiple processors or computers.The apparatus can include special purpose logic circuitry, e.g., an FPGA(field programmable gate array) or an ASIC (application specificintegrated circuit). The apparatus can also include, in addition tohardware, code that creates an execution environment for the computerprogram in question, e.g., code that constitutes processor firmware, aprotocol stack, a database management system, an operating system, or acombination of one or more of them.

A computer program (which may also be referred to or described as aprogram, software, a software application, a module, a software module,a script, or code) can be written in any form of programming language,including compiled or interpreted languages, or declarative orprocedural languages, and it can be deployed in any form, including as astand alone program or as a module, component, subroutine, or other unitsuitable for use in a computing environment. A computer program may, butneed not, correspond to a file in a file system. A program can be storedin a portion of a file that holds other programs or data, e.g., one ormore scripts stored in a markup language document, in a single filededicated to the program in question, or in multiple coordinated files,e.g., files that store one or more modules, sub programs, or portions ofcode. A computer program can be deployed to be executed on one computeror on multiple computers that are located at one site or distributedacross multiple sites and interconnected by a communication network.

As used in this specification, an “engine,” or “software engine,” refersto a software implemented input/output system that provides an outputthat is different from the input. An engine can be an encoded block offunctionality, such as a library, a platform, a software development kit(“SDK”), or an object. Each engine can be implemented on any appropriatetype of computing device, e.g., servers, mobile phones, tabletcomputers, notebook computers, music players, e-book readers, laptop ordesktop computers, PDAs, smart phones, or other stationary or portabledevices, that includes one or more processors and computer readablemedia. Additionally, two or more of the engines may be implemented onthe same computing device, or on different computing devices.

The processes and logic flows described in this specification can beperformed by one or more programmable computers executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Computers suitable for the execution of a computer program include, byway of example, can be based on general or special purposemicroprocessors or both, or any other kind of central processing unit.Generally, a central processing unit will receive instructions and datafrom a read only memory or a random access memory or both. The essentialelements of a computer are a central processing unit for performing orexecuting instructions and one or more memory devices for storinginstructions and data. Generally, a computer will also include, or beoperatively coupled to receive data from or transfer data to, or both,one or more mass storage devices for storing data, e.g., magnetic,magneto optical disks, or optical disks. However, a computer need nothave such devices. Moreover, a computer can be embedded in anotherdevice, e.g., a mobile telephone, a personal digital assistant (PDA), amobile audio or video player, a game console, a Global PositioningSystem (GPS) receiver, or a portable storage device, e.g., a universalserial bus (USB) flash drive, to name just a few.

Computer readable media suitable for storing computer programinstructions and data include all forms of non-volatile memory, mediaand memory devices, including by way of example semiconductor memorydevices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks,e.g., internal hard disks or removable disks; magneto optical disks; andCD ROM and DVD-ROM disks. The processor and the memory can besupplemented by, or incorporated in, special purpose logic circuitry.

To provide for interaction with a user, embodiments of the subjectmatter described in this specification can be implemented on a computerhaving a display device, e.g., a CRT (cathode ray tube) or LCD (liquidcrystal display) monitor, for displaying information to the user and akeyboard and a pointing device, e.g., a mouse or a trackball, by whichthe user can provide input to the computer. Other kinds of devices canbe used to provide for interaction with a user as well; for example,feedback provided to the user can be any form of sensory feedback, e.g.,visual feedback, auditory feedback, or tactile feedback; and input fromthe user can be received in any form, including acoustic, speech, ortactile input. In addition, a computer can interact with a user bysending documents to and receiving documents from a device that is usedby the user; for example, by sending web pages to a web browser on auser's client device in response to requests received from the webbrowser.

Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back end component,e.g., as a data server, or that includes a middleware component, e.g.,an application server, or that includes a front end component, e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described in this specification, or any combination of one ormore such back end, middleware, or front end components. The componentsof the system can be interconnected by any form or medium of digitaldata communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), e.g., the Internet.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinvention or of what may be claimed, but rather as descriptions offeatures that may be specific to particular embodiments of particularinventions. Certain features that are described in this specification inthe context of separate embodiments can also be implemented incombination in a single embodiment. Conversely, various features thatare described in the context of a single embodiment can also beimplemented in multiple embodiments separately or in any suitablesubcombination. Moreover, although features may be described above asacting in certain combinations and even initially claimed as such, oneor more features from a claimed combination can in some cases be excisedfrom the combination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various system modulesand components in the embodiments described above should not beunderstood as requiring such separation in all embodiments, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

Particular embodiments of the subject matter have been described. Otherembodiments are within the scope of the following claims. For example,the actions recited in the claims can be performed in a different orderand still achieve desirable results. As one example, the processesdepicted in the accompanying figures do not necessarily require theparticular order shown, or sequential order, to achieve desirableresults. In certain implementations, multitasking and parallelprocessing may be advantageous.

What is claimed is:
 1. A method for generating a target sequencecomprising a respective output at each of a plurality of output timesteps from an input sequence comprising a respective input at each of aplurality of input time steps, the method comprising: for each block ofa fixed number of input time steps in the input sequence: processingeach input in the block of input time steps using an encoder recurrentneural network (RNN) to generate a respective feature representation ofthe input; and processing the feature representations for the inputs inthe block and a preceding output at a preceding output time step using atransducer RNN to select a respective output for each of one or moreoutput time steps immediately following the preceding output time step.2. The method of claim 1, wherein, for the initial block in the inputsequence, the preceding output at the preceding output time step is aplaceholder start-of-sequence output.
 3. The method of claim 1, whereinprocessing the feature representations for the inputs in the block and apreceding output at a preceding output time step using a transducer RNNto select a respective output for each of one or more output time stepsimmediately following the preceding output time step comprises selectingoutputs until the selected output is a designated end-of-block output.4. The method of claim 3, wherein processing the feature representationsfor the inputs in the block and the preceding output at a precedingoutput time step using the transducer RNN comprises: processing thefeature representations for the inputs in the block and the precedingoutput using the transducer RNN to select a current output for a currentoutput time step immediately following the preceding output time step;when the current output is the designated end-of-block output,refraining from generating any more outputs for the block; and when thecurrent output is not the designated end-of-block output: processing thefeature representations for the inputs in the block and the currentoutput using the transducer RNN to select a next output for a nextoutput time step immediately following the current output time step. 5.The method of claim 1, wherein processing the feature representationsfor the inputs in the block and a preceding output at a preceding outputtime step using a transducer RNN to select a respective output for eachof one or more output time steps immediately following the precedingoutput time step comprises selecting outputs until a designation portionof an intermediate output of the transducer RNN indicates that theselected output is the last in the block.
 6. The method of claim 1,wherein the transducer RNN is configured to, for a given block of inputtime steps and to select an output for a given output time step: processthe output at an output time step immediately preceding the given outputtime step and a preceding context vector for the output time stepimmediately preceding the given output time step using a first RNNsubnetwork to update a current hidden state of the first RNN subnetwork;process the updated hidden state of the first RNN subnetwork and thefeature representations for the inputs in the given block of input timesteps using a context subnetwork to determine a current context vector;process the current context vector and the updated hidden state of thefirst RNN subnetwork using a second RNN subnetwork to update a currenthidden state of the second RNN subnetwork; and process the currenthidden state of the second RNN subnetwork using a softmax layer togenerate a respective score for each output in a dictionary of possibleoutputs.
 7. The method of claim 6, wherein the context subnetwork is anRNN.
 8. The method of any preceding claim, wherein the input sequence isa speech sequence and the target sequence is a sequence of phonemesrepresenting the speech sequence.
 9. A system comprising one or morecomputers and one or more storage devices storing instructions that areoperable, when executed by the one or more computers, to cause the oneor more computers to perform operations for generating a target sequencecomprising a respective output at each of a plurality of output timesteps from an input sequence comprising a respective input at each of aplurality of input time steps, the operations comprising: for each blockof a fixed number of input time steps in the input sequence: processingeach input in the block of input time steps using an encoder recurrentneural network (RNN) to generate a respective feature representation ofthe input; and processing the feature representations for the inputs inthe block and a preceding output at a preceding output time step using atransducer RNN to select a respective output for each of one or moreoutput time steps immediately following the preceding output time step.10. The system of claim 9, wherein, for the initial block in the inputsequence, the preceding output at the preceding output time step is aplaceholder start-of-sequence output.
 11. The system of claim 9, whereinprocessing the feature representations for the inputs in the block and apreceding output at a preceding output time step using a transducer RNNto select a respective output for each of one or more output time stepsimmediately following the preceding output time step comprises selectingoutputs until the selected output is a designated end-of-block output.12. The system of claim 11, wherein processing the featurerepresentations for the inputs in the block and the preceding output ata preceding output time step using the transducer RNN comprises:processing the feature representations for the inputs in the block andthe preceding output using the transducer RNN to select a current outputfor a current output time step immediately following the precedingoutput time step; when the current output is the designated end-of-blockoutput, refraining from generating any more outputs for the block; andwhen the current output is not the designated end-of-block output:processing the feature representations for the inputs in the block andthe current output using the transducer RNN to select a next output fora next output time step immediately following the current output timestep.
 13. The system of claim 9, wherein processing the featurerepresentations for the inputs in the block and a preceding output at apreceding output time step using a transducer RNN to select a respectiveoutput for each of one or more output time steps immediately followingthe preceding output time step comprises selecting outputs until adesignation portion of an intermediate output of the transducer RNNindicates that the selected output is the last in the block.
 14. Thesystem of claim 9, wherein the transducer RNN is configured to, for agiven block of input time steps and to select an output for a givenoutput time step: process the output at an output time step immediatelypreceding the given output time step and a preceding context vector forthe output time step immediately preceding the given output time stepusing a first RNN subnetwork to update a current hidden state of thefirst RNN subnetwork; process the updated hidden state of the first RNNsubnetwork and the feature representations for the inputs in the givenblock of input time steps using a context subnetwork to determine acurrent context vector; process the current context vector and theupdated hidden state of the first RNN subnetwork using a second RNNsubnetwork to update a current hidden state of the second RNNsubnetwork; and process the current hidden state of the second RNNsubnetwork using a softmax layer to generate a respective score for eachoutput in a dictionary of possible outputs.
 15. The system of claim 14,wherein the context subnetwork is an RNN.
 16. The system of claim 9,wherein the input sequence is a speech sequence and the target sequenceis a sequence of phonemes representing the speech sequence.
 17. Acomputer storage medium encoded with instructions that, when executed byone or more computers, cause the one or more computers to performoperations for generating a target sequence comprising a respectiveoutput at each of a plurality of output time steps from an inputsequence comprising a respective input at each of a plurality of inputtime steps, the operations comprising: for each block of a fixed numberof input time steps in the input sequence: processing each input in theblock of input time steps using an encoder recurrent neural network(RNN) to generate a respective feature representation of the input; andprocessing the feature representations for the inputs in the block and apreceding output at a preceding output time step using a transducer RNNto select a respective output for each of one or more output time stepsimmediately following the preceding output time step.
 18. The computerstorage medium of claim 17, wherein, for the initial block in the inputsequence, the preceding output at the preceding output time step is aplaceholder start-of-sequence output.
 19. The computer storage medium ofclaim 17, wherein processing the feature representations for the inputsin the block and a preceding output at a preceding output time stepusing a transducer RNN to select a respective output for each of one ormore output time steps immediately following the preceding output timestep comprises selecting outputs until the selected output is adesignated end-of-block output.
 20. The computer storage medium of claim17, wherein the transducer RNN is configured to, for a given block ofinput time steps and to select an output for a given output time step:process the output at an output time step immediately preceding thegiven output time step and a preceding context vector for the outputtime step immediately preceding the given output time step using a firstRNN subnetwork to update a current hidden state of the first RNNsubnetwork; process the updated hidden state of the first RNN subnetworkand the feature representations for the inputs in the given block ofinput time steps using a context subnetwork to determine a currentcontext vector; process the current context vector and the updatedhidden state of the first RNN subnetwork using a second RNN subnetworkto update a current hidden state of the second RNN subnetwork; andprocess the current hidden state of the second RNN subnetwork using asoftmax layer to generate a respective score for each output in adictionary of possible outputs.